home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / mus / play / DMODP35b.lha / DASModPlayer / Rexx / LZX-list.drx next >
Text File  |  1995-03-10  |  3KB  |  75 lines

  1. /****************************************************\
  2.  *    LZX-Multifile lister V1.0 by Antti Tuominen   *
  3.  ****************************************************
  4.  * This script is freeware, you can do anything you *
  5.  * want with it as long as you remember that I      *
  6.  * don't take any responsibility of what it does or *
  7.  * doesn't do. Feel free to include this to future  *
  8.  * DAS release archives, P.P.                       *
  9.  ****************************************************
  10.  * Use similar external arcs config entry:          *
  11.  * Packer path:                                     *
  12.  *   sys:rexxc/rx dh1:progs/das/rexx/LZX-list.drx   *
  13.  *   Ending ID:  #?.LZX                             *
  14.  * Packer opts:  extract                            *
  15.  *  Packer ~():  ~(#?readme#?|#?.diz|#?.displayme)  *
  16.  *                                                  *
  17.  * Match string: LZX                                *
  18.  *  Name offset: 41                                 *
  19.  * Listing opts: list                               *
  20.  *  Name length: 40                                 *
  21.  *  ___                     ___                     *
  22.  * !_V_! Byte length name  !_V_! Multifiles?        *
  23.  * !___! First file?       !_V_! Tempdir            *
  24.  ****************************************************
  25.  * Contact info:                                    *
  26.  * E-Mail: mfs@mits.mdata.fi                        *
  27.  * Voice phone: +358-0-745377                       *
  28.  * Data phone (My BBS): +358-0-7545 896             *
  29.  *                      +358-0-7545 059             *
  30.  * Snail Mail:  Antti Tuominen                      *
  31.  *              Suursuontie 2 B 28                  *
  32.  *              00630 HELSINKI (/FINLAND)           *
  33.  ****************************************************
  34.  *  !!!! EDIT THE PATH TO YOUR LZX ON LINE 47 !!!!  *
  35.  ****************************************************
  36.  * Additional info by Pauli Porkka:                 *
  37.  *  If you try to load a lzx archive from drive     *
  38.  *  named with spaces (example: "Ram Disk") it won't*
  39.  *  work. If you find this insufficient, please use *
  40.  *  default "only one file extraction" scheme.      *
  41.  *  One file extractions are same as mentioned above*
  42.  *  except that select "First file" instead of      *
  43.  *  "Multifiles" and extract options = "-m x"       *
  44.  *  and there is no listing options.                *
  45. \****************************************************/
  46.  
  47. LZX = 'lzx'   /* <- Correct the path! */
  48.  
  49. parse ARG komento arg2 arg3 arg4
  50. select
  51.   when komento == 'list' then do
  52.     address command lzx || ' l ' || arg2 || ' >t:LZX_list.temp ' || arg3
  53.     if ~open(infile, 't:LZX_list.temp', 'R') then exit 20
  54.     rivi = ' '
  55.     do until left(rivi, 1) == '-'
  56.       rivi = readln(infile)
  57.     end
  58.     exit = 0
  59.     do until exit == 1
  60.       rivi = readln(infile)
  61.       if left(rivi,1) == '-' then exit = 1
  62.       if ((left(rivi,1) ~= '-') & (length(rivi) > 43)) then do
  63.         say right(rivi, length(rivi) - 43)
  64.       end
  65.     end
  66.     call close infile
  67.     address command 'delete t:LZX_list.temp quiet'
  68.   end /* select/list */
  69.  
  70.   when komento = 'extract' then do
  71.     address command LZX || ' -m x >nil: ' || arg2 || ' ' || arg3 || ' ' || arg4
  72.   end
  73.   OTHERWISE exit 0
  74. end /*select*/
  75.